const initialState = {
  count: 100,
};

export default function reducer(state = initialState, { type, payload }) {
  console.warn('进到仓库了  ----->  ', type, payload);
  switch (type) {
    case 'add':
      return { ...state, count: state.count + payload };

    case 'des':
      return { ...state, count: state.count - payload };
    default:
      return state;
  }
}
